package gw.comp.combobox;

import gw.comp.combobox.ValorObservable;
import java.util.Observable;
import java.util.Observer;
import javax.swing.JButton;

/**
 *
 * @author jcastillo
 */
public class Boton extends JButton implements Observer{

    private ValorObservable vo = null;

    public Boton(ValorObservable vo) {
        this.vo = vo;
    }

    public Boton() {
    }

    public void update(Observable obs, Object obj) {
        if( obs == vo ){
            setText("Cual es el codigo de: " + vo.getnValor());
        }
    }

}
